<html>
<head>
	<meta http-equiv=Content-Type content="text/html;charset=utf-8">
	<title>jquery-ajax</title>
</head>
<body>
	<div id="cnt">
	</div>
        <script type="text/javascript" src="/static/js/jquery-1.8.3.min.js"></script>
	<script>
	
	var param={ page:1 };
	$.getJSON('/list', param,  function(data){
		console.dir(data);
		var htm=['<table border=1>'];
		htm.push('<tr><td>id</td><td>标题</td></tr>');
		for(var i=0,len=data.length; i<len; i++){
			htm.push('<tr>');
			htm.push('<td>'+data[i]['id']+'</td>');
			htm.push('<td>'+data[i]['cnt']+'</td>');
			htm.push('</tr>');
		}
		htm.push('</table>');
		$('#cnt').html(htm.join(''));
	}); 


	</script>

</body>
</html>
